package com.bangyu.monitor.modular.system.controller;

import cn.stylefeng.roses.core.base.controller.BaseController;
import cn.stylefeng.roses.core.reqres.response.ResponseData;
import cn.stylefeng.roses.core.reqres.response.SuccessResponseData;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONPObject;
import com.bangyu.monitor.core.common.constant.ConstantEnum;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * @Auther: zhangxue
 * @Date: 19/4/6 16:01
 * @Description:
 */
@Controller
@RequestMapping("/constant/")
public class ConstantController extends BaseController {

    @RequestMapping("getOrgs")
    @ResponseBody
    public ResponseData getOrgs(){
        SuccessResponseData data = new SuccessResponseData();
        data.setData(ConstantEnum.OrgEnum.toMap());
        System.out.println(JSON.toJSONString(data));;
        return data;
    }

    @RequestMapping("getPositions")
    @ResponseBody
    public ResponseData getPositions(){
        SUCCESS_TIP.setData(ConstantEnum.PositionEnum.toMap());
        return SUCCESS_TIP;
    }


}
